Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuarkusComponentTest: fix @InjectMock inconsistency #41305

Merged
merged 1 commit into from
Jun 19, 2024

Conversation

mkouba
Copy link
Contributor

@mkouba mkouba commented Jun 19, 2024

  • take into consideration method params with @InjectMock when marking beans as unremovable
  • document that @InjectMock is not intended as a universal replacement for the functionality provided by the Mockito JUnit extension.
  • also skip param injection for params annotated with @org.mockito.Mock so that @SkipInject is not needed.
  • fixes QuarkusComponentTest -> No ParameterResolver registered for parameter #41224

- take into consideration method params with `@InjectMock` when marking
beans as unremovable
- document that `@InjectMock` is not intended as a universal replacement
for the functionality provided by the Mockito JUnit extension.
- also skip param injection for params annotated with
`@org.mockito.Mock` so that `@SkipInject` is not needed.
- fixes quarkusio#41224
@mkouba mkouba requested a review from manovotn June 19, 2024 10:19
Copy link

quarkus-bot bot commented Jun 19, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 86bba7a.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

⚠️ There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

github-actions bot commented Jun 19, 2024

🙈 The PR is closed and the preview is expired.

Copy link
Contributor

@manovotn manovotn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!

@manovotn manovotn added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jun 19, 2024
@mkouba mkouba merged commit ed77ee2 into quarkusio:main Jun 19, 2024
24 checks passed
@gsmet
Copy link
Member

gsmet commented Jun 26, 2024

@mkouba I think we should backport this one to 3.12. Do you agree? If so please add the label, thanks!

@manovotn
Copy link
Contributor

+1 for backporting

@gsmet gsmet added this to the 3.12.1 milestone Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/waiting-for-ci Ready to merge when CI successfully finishes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QuarkusComponentTest -> No ParameterResolver registered for parameter
3 participants